#ifndef DEBUG_CONFIG_H
#define DEBUG_CONFIG_H

#include "algohub_export.h" // Use the main export macro
#include <string>
#include <map>
#include <iostream>

namespace algo 
{
    class ALGOHUB_EXPORT DebugConfig 
    {
    public:
        static DebugConfig& getInstance();

        void load(const std::string& filepath = "debug_config.ini");
        bool isEnabled(const std::string& key, bool default_value = false) const;

    private:
        DebugConfig();
        // Stores keys in "Section.key" format
        std::map<std::string, std::string> config_data;
    };
}

using namespace algo;

// Helper macro for easy access
#define DEBUG_LOG(key, msg) \
    if (DebugConfig::getInstance().isEnabled("General.debug_mode_enabled", false) && DebugConfig::getInstance().isEnabled(key, false)) { \
        std::cout << "[" << key << "] " << msg << std::endl; \
    }

#endif // DEBUG_CONFIG_H